﻿@model IEnumerable<RedSand.Site.Models.NewsInfo>
@if (Model != null)
{
    <div class="panel-content-news @string.Format("category_{0}", ViewBag.CategoryID) clearfix">
        <img class="avt fl" src="@Model.FirstOrDefault().Image.GetImageUrl()" />
        <h4 class="title">
            <a href="/@RedSand.Web.Language.RsLanguage.LanguageCode/news/details/@Model.FirstOrDefault().NewsID/@Model.FirstOrDefault().Title.ToUrlString()">@Model.FirstOrDefault().Title</a></h4>
        <p class="description">
            @Model.FirstOrDefault().Description.SubStringExtended(0, 140)
        </p>
        <ul class="list-news-related">
            @foreach (var item in Model.Where(m => m.NewsID != Model.FirstOrDefault().NewsID).ToList())
            {
                <li><a href="/@RedSand.Web.Language.RsLanguage.LanguageCode/news/details/@item.NewsID/@item.Title.ToUrlString()">@item.Title</a></li>
            }
        </ul>
    </div>
}
